import {homeMethod} from '@/utils/models/index.js'
const crudMethod = new homeMethod();
import Footer from '@/components/footer-main'
export default {
  name: 'Home',
  components: { Footer},
  data() {
    return {
      caseId: null,
      loading: false,
      preview: null,
    }
  },
  created() {
    this.caseId = this.$route.query.id
     this.getDetail()
  },
  methods: {
    getDetail() {
      let _this = this
      _this.loading = true
      crudMethod.getCaseDetail(_this.caseId).then((res) => {
        _this.loading = false
        let {msg, code, data} = res;
        document.title = data.data.caseName
        data.data.caseDetailImg = data.data.caseDetailImg ? data.data.caseDetailImg.split(',') : []
        _this.preview = data.data
      })
    },
  }
}
